jQuery(document).ready(function() {
	
	setCookie("tiangge_mode","edit");
	resizeIframe();
	/*var settings = { autoReinitialise: true };
	jQuery('.scroll-pane').jScrollPane();*/
	jQuery(window).on("resize", function(event){
		resizeIframe();
	});
	
	/* if( /Android|iPhone|Opera Mini/i.test(navigator.userAgent)){ 
	jQuery("#submit_mobtel2").insertAfter( ".error3" );
	} */
    if("window", $( window ).width() < 460){
    	jQuery("#confirm").addClass("width90butt");
    	jQuery("#confirm").removeClass("floatCenterActivate");
    }
    
	
	var baseurlsummary = baseurl + "summary/";
	
	if (/summary/.test(self.location.href)){
		//var mobtel = getCookie("tiangge_mobtel");
		//var subsId = getCookie("tiangge_subsId");
		var id = getCookie('tiangge_id');
		var ids = id.split(".");
		var subsId = ids[2];
		//jQuery.getJSON(baseurlsummary+"retrieveUserProfileToDB/"+mobtel,{ajax:'true'},function(j){});
		jQuery.getJSON(baseurlsummary+"retrieveUserProfileToDB/"+subsId,{ajax:'true'},function(j){});
	}
	
	jQuery('#mobile_number2,#verif_code2').bind("cut copy paste",function(e) {
     	 e.preventDefault();
  	});
	
    //Number only Note 3
	jQuery('#mobile_number2, #verif_code2').keyup(function () {
		if (this.value != this.value.replace(/[^0-9]/g, '')) {
		  this.value = this.value.replace(/[^0-9]/g, '');
		}
	});
	/* detect ctrl+v ,Ctrl+c 
	var ctrlDown = false;
    var ctrlKey = 17, vKey = 86, cKey = 67, xKey = 88
    $(document).keydown(function(e)
    {
        if (e.keyCode == ctrlKey) ctrlDown = true;
    }).keyup(function(e)
    {
        if (e.keyCode == ctrlKey) ctrlDown = false;
    });

	$('#mobile_number2,#verif_code2').keydown(function(e){
		if (ctrlDown && (e.keyCode == vKey || e.keyCode == cKey || e.keyCode == xKey)) return false;
    });
	//end
	*/
	
	jQuery(document).on("click", "#agreecheckbox", function() {
		jQuery("#agree").toggle();
		if(document.getElementById("agree").checked == true) {
			jQuery(".customCheckbox .checkbg").addClass("checkedbg");
			jQuery('#confirm').removeClass("disable");
			//document.getElementById("checkmepls").setAttribute("style", "background-image: url(http://goplay.globe.com.ph/tiangge/skin/images/check-box.png);");	// for IE FUCKING 8
		} else {
			jQuery(".customCheckbox .checkbg").removeClass("checkedbg");
			//document.getElementById("checkmepls").setAttribute("style", "background-image: url(http://goplay.globe.com.ph/tiangge/skin/images/check-box-blank.png);");	// for IE FUCKING 8
			jQuery('#confirm').addClass("disable");
		}
	});
	
    jQuery('#confirm').click(function(){
    	if(jQuery(this).hasClass("disable")) {
		//console.log("disabled");
    		return false;
    	} else {
    		// submit
    		//jQuery.getJSON(baseurlsummary+"sendPlanCode/"+mobtel,{ajax:'true'},function(j){
			//var subsId = getCookie("tiangge_subsId");
			var id = getCookie('tiangge_id');
			var ids = id.split(".");
			var subsId = ids[2];
		
			jQuery.getJSON(baseurlsummary+"sendPlanCode/"+subsId,{ajax:'true'},function(j){
					if(j.status==0) {
					redirect_parsed = j.redirect.replace(/\\/g, "");
					window.location=redirect_parsed;
					//setCookie("tiangge_planCode",j.planCode);
					//jQuery("#nameReturned").text(j.name);
    				//jQuery("#planCodemismo").text(j.planCode);
					//jQuery("#globe").show();
    				//jQuery(".planCode").show();
					//jQuery("#statusSummary").hide();
    				//jQuery("#changedevice, #changepromodetails, #changemobtel, #changeuserprofile, #changestore, #termsandconditionscontainer, #footnote,  #termsandconditionscontainer").hide();
					//jQuery("#printbutton").show();
					//resizeIframe();
					//scrollFrameHeight('0');
					// delete all cookies
					//deleteCookies();
    			} else {
    				alert(j.description);
    			}
    		});
    	}
    });		
	
	jQuery('#changedevice').click(function(){
	    setCookie("tiangge_mode","edit");
		window.location=baseurl + "gallery";
		setCookie("tiangge_current_pos","5");
		scrollFrameHeight('0');
		return false;
	});
	
	jQuery('#changepromodetails').click(function(){
	    setCookie("tiangge_mode","edit");
		window.location=baseurl + "promo";
		setCookie("tiangge_current_pos","5");
		//scrollFrameHeight('0');
		return false;
	});
	
	_ua = navigator.userAgent;
	/* FIX FOR FUCKING TAB 2 BLACK */
	if(_ua.search("IMM76D") > 0) {
		//alert("tab 2 black"); 
		jQuery("#changemobtel").click(function() {
		    setCookie("tiangge_mode","edit");
			jQuery('#mobile_number2').val("");
			jQuery('#verif_code2').val("");
			jQuery('#verificationCode2').hide();
			jQuery('.dialog_overlay').fadeIn();
			jQuery('#modalmobtel').fadeIn();
			if ("window", $( window ).width() == 600) {
				jQuery(".dialog_overlay").css({
					"max-height":"1000%",
					"height":"1000%"
				});	
				jQuery(".modalStyle h1").css("font-size","17px");
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"29%","width":"100%"});
				yPos = jQuery("#modalmobtel").position().top;
				yPos = parseInt(yPos);
				scrollFrameHeight(yPos);
				//alert("600 " +yPos);
			} else if ("window", $( window ).width() == 1024) {
				jQuery(".dialog_overlay").css({
					"max-height":"1000%",
					"height":"1000%"
				});	
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"8%","width":"100%"});	
				scrollFrameHeight('200'); 
				//alert("1024 200");
			}
		setCookie("tiangge_current_pos","5");
		jQuery('#notglobe').prop('checked', false);
		jQuery('#savechanges').addClass("disable");
		jQuery("#submit_mobtel2").text("Send code");
		jQuery("#mobile_number2, #submit_mobtel2").removeClass("disable").removeAttr("disabled", false);
		jQuery(".error1, .error2, .error3, .error4, .errorBox2").hide();
		jQuery("#mobile_number2").removeClass("error");
		return false;
		});
	/* FIX FOR FUCKING TAB 2 WHITE */
	} else if (_ua.search("GT-P31") > 0) {
		//alert("tab 2 white");
		jQuery("#changemobtel").click(function() {
			setCookie("tiangge_mode","edit");
			jQuery('#mobile_number2').val("");
			jQuery('#verif_code2').val("");
			jQuery('#verificationCode2').hide();
			jQuery('.dialog_overlay').fadeIn();
			jQuery('#modalmobtel').fadeIn();
			if ("window", $( window ).width() == 600) {
				jQuery(".dialog_overlay").css({
					"max-height":"1000%",
					"height":"1000%"
				});	
				jQuery(".modalStyle h1").css("font-size","17px");
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"29%","width":"100%"});
				yPos = jQuery("#modalmobtel").position().top;
				yPos = parseInt(yPos);
				scrollFrameHeight(yPos); 
				//alert("600 "+yPos+"");
			} 
			if ("window", $( window ).width() == 1024) {
				jQuery(".dialog_overlay").css({
					"max-height":"1000%",
					"height":"1000%"
				});	
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"8%","width":"100%"});	
				scrollFrameHeight('200'); 
				//alert("1024");
			}
		setCookie("tiangge_current_pos","5");
		jQuery('#notglobe').prop('checked', false);
		jQuery('#savechanges').addClass("disable");
		jQuery("#submit_mobtel2").text("Send code");
		jQuery("#mobile_number2, #submit_mobtel2").removeClass("disable").removeAttr("disabled", false);
		jQuery(".error1, .error2, .error3, .error4, .errorBox2").hide();
		jQuery("#mobile_number2").removeClass("error");
		return false;		
		}); 
	} else {
		jQuery("#changemobtel").click(function() {
			setCookie("tiangge_mode","edit");
			jQuery('#mobile_number2').val("");
			jQuery('#verif_code2').val("");
			jQuery('#verificationCode2').hide();
			jQuery('.dialog_overlay').fadeIn();
			jQuery(".dialog_overlay").css({
				"max-height":"1000%",
				"height":"1000%"
			});	
			jQuery('#modalmobtel').fadeIn();
			if ("window", $( window ).width() < 641) {	
				jQuery(".modalStyle h1").css("font-size","17px");	
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"29%","width":"100%"});
				yPos = jQuery("#modalmobtel").position().top;
				yPos = parseInt(yPos);
				scrollFrameHeight(yPos);	
			} else if ("window", $( window ).width() == 768) {
				jQuery(".modalStyle h1").css("font-size","17px");	
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"15%","width":"100%"});
				scrollFrameHeight('200');
			} else {
				jQuery('#modalmobtel').css({"z-index":"9999","position":"absolute","top":"300px","width":"100%"});	
				scrollFrameHeight('200'); 	
			}
		setCookie("tiangge_current_pos","5");
		jQuery('#notglobe').prop('checked', false);
		jQuery('#savechanges').addClass("disable");
		jQuery("#submit_mobtel2").text("Send code");
		jQuery("#mobile_number2, #submit_mobtel2").removeClass("disable").removeAttr("disabled", false);
		jQuery(".error1, .error2, .error3, .error4, .errorBox2").hide();
		jQuery("#mobile_number2").removeClass("error");
		return false;
		});
	}
	
	jQuery('#changeuserprofile').click(function(){
		setCookie("tiangge_mode","edit");
		window.location=baseurl + "userprofile";
		setCookie("tiangge_current_pos","5");
		scrollFrameHeight('0');
		return false;
	});
	
	jQuery('#changestore').click(function(){
		setCookie("tiangge_mode","edit");
		window.location=baseurl + "globestore";
		setCookie("tiangge_current_pos","5");
		scrollFrameHeight('0');
		return false;
	});
	
	jQuery('.closeIcon').click(function(){
		jQuery('.dialog_overlay').fadeOut();
		jQuery('#modalmobtel').fadeOut();
		return false;
	});
	
	//Start of Code Change Mobile Number
	jQuery("#mobile_number2, #verif_code2").keypress(function (evt) {
	
	  	 evt = evt || window.event;
  		 var charCode = evt.which || evt.keyCode;
  		 var charStr = String.fromCharCode(charCode);
  		 if ( /[a-z0-9]/i.test(charStr) || evt.which == 8 || evt.which == 9 || (evt.which > 36 || evt.which < 41)) {
  		 }else{
			return false;
		 }
		 if (evt.which != 8 && evt.which != 0 && (evt.which < 48 || evt.which > 57)) {
            return false;
    	 }
	}); 

	jQuery('#mobile_number2').keypress(function (e) {
	jQuery(".error1, .error2, .error3, .error4, .errorBox2, #verificationCode2").hide();	
	 var key = e.which;
	 if(key == 13)  // the enter key code
	  {
		jQuery("#submit_mobtel2").click();
	  }
	});
	
	jQuery('#verif_code2').keypress(function (e) {
	 var key = e.which;
	 if(key == 13)  // the enter key code
	  {
		jQuery("#validate_verif_code2").click();
	  }
	});	
	
	jQuery("#submit_mobtel2").click(function(){
	
		if (!jQuery("#submit_mobtel2").hasClass("disable")) {
		jQuery(".error1, .error2, .error3, .error4, .errorBox2").hide();
		//jQuery(".error1").css("margin-top","50px");
		//jQuery(".error2").css("margin-top","50px");
	
		var mobtel = jQuery("#mobile_number2").val();
		var verify = getCookie("tiangge_fb_verify");
		var current_num = jQuery.trim(jQuery("#sum-mobtel").text());
		  
		if(mobtel.length!=11) {
			jQuery("#submit_mobtel2").text("Send code");
			jQuery(".error1").show();
			jQuery(".error2, .error3, .error4").hide();
			jQuery("#verificationCode2").hide();
			jQuery("#mobile_number2").addClass("error");
			jQuery("#mobile_number2").focus();
		} else if (current_num == mobtel){
			jQuery(".error1, .error3, .error4").hide();
			jQuery(".error2").show();
			jQuery("#verificationCode").hide();
			jQuery("#mobile_number2").addClass("error");
			jQuery("#verificationCode2").hide();
			jQuery("#mobile_number2").focus();
		} else {
			jQuery("#prepaidNumber2 .errorBox").hide();
			
			jQuery.getJSON(baseurl + "prepaid/verifynumber3/" + mobtel,{ajax: 'true'}, function(j){
				if(j.status==0) {
					jQuery("#submit_mobtel2").text("Resend code");
					jQuery(".error1, .error2, .error3, .error4, .errorBox2").hide();
					jQuery("#verificationCode2").show();
					jQuery("#mobile_number2, #verif_code2").removeClass("error");
					jQuery("#verif_code2").focus();
					jQuery("#verif_code2").val('');
				} else if (j.status==-3){
				    jQuery(".error1, .error2, .error4").hide();
					jQuery(".error3").show();
					jQuery("#mobile_number2").addClass("error");
					jQuery("#verificationCode2").hide();
					jQuery("#mobile_number2").focus();
				} else if (j.status==-2){
				    jQuery(".error1, .error2, .error3").hide();
					jQuery(".error4").show();
					jQuery("#mobile_number2").addClass("error");
					jQuery("#verificationCode2").hide();
					jQuery("#mobile_number2").focus();
				} else {
					jQuery(".error2, .error3, .error4").hide();
					jQuery(".error1").show();
					jQuery("#mobile_number2").addClass("error");
					jQuery("#verificationCode2").hide();
					jQuery("#mobile_number2").focus();
				}		
			});
		}
		}
	});
	
	jQuery("#validate_verif_code2").click(function() {
	
	//jQuery(".errorBox2").css("margin-top","60px");
	
		vcode=jQuery("#verif_code2").val();
		if(vcode.length==6) {
			jQuery("#verificationCode2 .errorBox2").hide();
			
			jQuery.getJSON(baseurl + "prepaid/verifycode/" + vcode,{ajax: 'true'}, function(j){
				if(j.status==0) {
					jQuery("#verificationCode2 .errorBox2").hide();
					jQuery("#savechanges").removeClass("disable");
					jQuery("#savechanges").removeAttr("disabled", false);
					jQuery("#verif_code2").removeClass("error");
					jQuery("#verificationCode2").hide();
				} else {
					jQuery("#verificationCode2 .errorBox2").show();
					jQuery("#verif_code2").addClass("error");
					jQuery("#verif_code2").focus();
				}	
			});
		} else {
			jQuery("#verificationCode2 .errorBox2").show();
			jQuery("#verif_code2").addClass("error");
			jQuery("#verif_code2").focus();
		}
	});
	
	jQuery("#savechanges").click(function() {
	if (!jQuery("#savechanges").hasClass("disable")) {
		jsonURL = ""
		if(jQuery("#notglobe").is(":checked")) {
			noneMobtel = "None";
			jQuery("#sum-mobtel").text(noneMobtel);
			setCookie("tiangge_mobtel","0");

			jsonURL = baseurl + "prepaid/saveNonGlobe/";
		}
		else if (!jQuery("#savechanges").hasClass("disable")) {
			var mobtel = getCookie("tiangge_mobtel");
			setCookie("tiangge_oldmobtel",mobtel);
			var mobile_number2 = jQuery("#mobile_number2").val();
			setCookie("tiangge_mobtel",mobile_number2);
			document.cookie = 'temp_mobtel=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
			jQuery("#sum-mobtel").text(mobile_number2);

			jsonURL = baseurl + "prepaid/savenumber/";
		}
			
		jQuery.getJSON(jsonURL,{ajax: 'true'}, function(j){
			if(j.status==0) {
				jQuery('.dialog_overlay').fadeOut();
				jQuery('#modalmobtel').fadeOut();
			} else {
				jQuery(".error1").text(j.error);
				jQuery(".error1").show();
			}		
		});
		if ("window", $( window ).width() < 361) {
			scrollFrameHeight('1200');
		} else if ("window", $( window ).width() < 641) {
			scrollFrameHeight('1000');
		} else {
			scrollFrameHeight('500');
		}
	}
	});
	
	jQuery("#notglobe").change(function() {
		if(jQuery(this).is(":checked")) {
			// disable buttons + input field, change saved to normal
			jQuery("#mobile_number2, #submit_mobtel2").addClass("disable").attr("disabled", "disabled");
			jQuery("#savechanges").removeClass("disable").removeAttr("disabled", false);
			jQuery("#mobile_number2").val("");
			jQuery("#mobile_number2, #verif_code2").removeClass("error");
			jQuery(".error1, .error2, .error3, .error4, .errorBox2, #verificationCode2").hide();	
		} else {
			jQuery("#mobile_number2, #submit_mobtel2").removeClass("disable").removeAttr("disabled", false);
			jQuery("#savechanges").addClass("disable").attr("disabled", "disabled");
			jQuery("#mobile_number2").focus();
		}
	});
	
	//End of Code Change Mobile Number

	jQuery(".printIcon, .printterms").click(function(e) {
		// print terms
		e.preventDefault();
		//window.print();
		/*var newWin = window.frames["printf"];
		newWin.document.write('<body onload="window.print()">dddd</body>');
		newWin.document.close();*/
		
		//var body = jQuery("#orderSummary").html();
		var body = jQuery(".termsACondition").html();
		myWindow=window.open('','','width=300,height=200,scrollbars=yes,location=no');
		myWindow.document.write("<h2>Terms and conditions</h2>");
		myWindow.document.write(body);
		myWindow.document.close(); //missing code
		myWindow.focus();
		myWindow.print();

		/*var print_url = baseurl+"summary";

        jQuery("body").append('<iframe id="print_page" name="print_page" src=' + print_url + ' style="display: none; @media print { display: block; }"></iframe>');

        jQuery('#print_page').on("load", function() {
            window.frames["print_page"].focus();
            window.frames["print_page"].print();
        });*/

 		
	});
	
	jQuery("#btn_print").click(function(e) { 
		// print summary
		e.preventDefault();
		
		template_url = baseurl.replace("/index.php/", "/");
		
		html_container = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns:fb="http://ogp.me/ns/fb#"><head>';
		html_container += '<link rel="stylesheet" type="text/css" href="'+template_url+'skin/css/jquery-ui.css" />';
		html_container += '<link rel="stylesheet" type="text/css" href="'+template_url+'skin/css/custom.css">';
		html_container += '<link rel="stylesheet" type="text/css" href="'+template_url+'skin/css/flux-1_2.css">';
		html_container += '<link rel="stylesheet" type="text/css" href="'+template_url+'skin/css/globelogoshow.css">';
		
		if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) 
			html_container += '<link rel="stylesheet" type="text/css" href="'+template_url+'skin/css/safari.css">';
		else
			html_container += '<link rel="stylesheet" type="text/css" href="'+template_url+'skin/css/maitai.css">';
			
		html_container += '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><meta name="apple-mobile-web-app-capable" content="yes">';
		html_container += '</head><body>';
		
		jQuery("#footnote").remove(); 
		//jQuery("#printbutton").remove();
		var body = jQuery("#orderSummary").html();
		myWindow=window.open('','','width=500,height=500,scrollbars=yes,location=no');
		myWindow.document.write(html_container);
		myWindow.document.write(body);
		myWindow.document.write("</body></html>");
		myWindow.document.close(); //missing code
		
		setTimeout(function(){
		myWindow.focus();
		myWindow.print();		
		}, 3000);

		
	});
});

   function setCookie(cname,cvalue) {
    var d = new Date();
    d.setTime(d.getTime() + (30*60*1000));
	
	ua_tab2ics = "IMM76D";
	_ua = navigator.userAgent;
	
	if(_ua.search(ua_tab2ics) > 0)
	    document.cookie = cname+"="+cvalue+"; path=/"; 
	else{
	
	var expiration = getCookie("tiangge_expiration");
	if(expiration=="")
		var expires = "expires=" + d.toUTCString();
	else{
		var e = new Date();
		e.setTime(parseInt(expiration) + (30*60*1000));
	    var expires = "expires=" + e.toUTCString();
	}
	
	//document.cookie = cname+"="+cvalue+"; path=/;"+expires;
	document.cookie = cname+"="+cvalue+"; path=/";
	}
  }

   function getCookie(cname) {
	var name = cname + "=";
	var ca = document.cookie.split(';');
	for(var i=0; i<ca.length; i++) 
	{
	var c = ca[i].replace(/\s/g, "");
	if (c.indexOf(name)==0) return c.substring(name.length,c.length);
	}
	return "";
   }
   
   function deleteCookies() {
		document.cookie = 'address=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'area=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'bday=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'choosePromo=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'commitmentBox=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'commitmentMonths=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'current_pos=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'discounted=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'eadd=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'gadget=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'gadgetid=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'globestore=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'globestoreid=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'gadgetid=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'imgsrc=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'mobtel=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'months=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'nname=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'othercont=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'postalcode=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'postalIds=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'price=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'promo=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'promoDesc=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'promoprice=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'province=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'rebateamt=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'sku=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'sumname=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'totalcash=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'totalrebate=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'town=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'username=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'validity=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'temp_mobtel=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'mode=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'usertype=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'storehours=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'storeLong=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'storeLat=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'planprice=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'loc=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'globestoreAddress=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'globestoreAddress=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'mt_client=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'expiration=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
		document.cookie = 'region=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';
   }